]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspacesView: Always zoom out switcher when using static workspaces
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 24 Jan 2013 11:14:19 +0000 (12:14 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 4 Mar 2013 14:51:25 +0000 (15:51 +0100)
We always leave the workspace switcher zoomed out when we can assume
that the user is actually making use of workspaces. For the default
dynamic workspace behavior, we make this assumption when more than
two workspaces are in use (e.g. at least two workspaces contain windows
plus an empty one at the end). However this test does not make sense
when using static workspaces - in that case, not using workspaces
would be indicated by a workspace number of 1 (in which case the
entire switcher is hidden completely), so add a check for dynamic
workspaces to the condition.

https://bugzilla.gnome.org/show_bug.cgi?id=695126

js/ui/overviewControls.js

index 4a528e2ff83b63c0eca2d7147ea0a893d40ff32b..0906885ac5867ba722c00c18794a87845f4c6347 100644 (file)
@@ -2,6 +2,7 @@
 
 const Clutter = imports.gi.Clutter;
 const Lang = imports.lang;
+const Meta = imports.gi.Meta;
 const St = imports.gi.St;
 const Shell = imports.gi.Shell;
 
@@ -248,7 +249,7 @@ const ThumbnailsSlider = new Lang.Class({
     _getAlwaysZoomOut: function() {
         // Always show the pager when hover, during a drag, or if workspaces are
         // actually used, e.g. there are windows on more than one
-        let alwaysZoomOut = this.actor.hover || this.inDrag || global.screen.n_workspaces > 2;
+        let alwaysZoomOut = this.actor.hover || this.inDrag || !Meta.prefs_get_dynamic_workspaces() || global.screen.n_workspaces > 2;
 
         if (!alwaysZoomOut) {
             let monitors = Main.layoutManager.monitors;